/*
 * Snake entry point.
 */

#include <stdlib.h>
#include <Windows.h>
#include <time.h>
#include <glut.h>
#include <gl/GL.h>

// own headers
#include "Virtual Snake 3D\Snake.h"

static Snake *snake_ctrl;
static bool run = true;

void display()
{

}

void timer(int x = 0)
{
	snake_ctrl->SnakeUpdate();
	glutTimerFunc(10, timer, 0);
}

void keyboard_func(unsigned char key, int x, int y)
{
}

int main(int argc, char **argv)
{
	snake_ctrl = new Snake();
	glutInit(&argc, argv);
	glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB);
	glutInitWindowSize(800, 600);
	glutInitWindowPosition(50, 100);
	glutCreateWindow("Snake");

	glLoadIdentity();
	glMatrixMode(GL_PROJECTION);
	glOrtho(0, 800, 600, 0, 0, 1);

	glutDisplayFunc(display);
	glutKeyboardFunc(keyboard_func);
	MessageBox(NULL, L"Press oke to continue!", L"Pauze!", MB_OK);
	timer();
	glutMainLoop();
	return 0;
}
	
